package com.an.homework;

public class HomeWork_1 {
//    public static void main(String[] args) {
////        Frock frock = new Frock();
////        int ret=frock.getNextNUM();
////        System.out.println(ret);
////     ret=frock.getNextNUM();
////        System.out.println(ret);
//
//        Frock frock = new Frock(100);
//    }

}

class Frock{
    private static int currentNUM=100000;//衣服出厂序列号起始值
    private int seriaNumber;

//    public static int getCurrentNUM() {
//        return currentNUM;
//    }


    public static int getNextNUM(){
        currentNUM+=100;
        return currentNUM;
    }

    public Frock(){
        seriaNumber=getNextNUM();
    }
    public int getSeriaNumber(){
        return seriaNumber;
    }

}

class TestFrock{
    public static void main(String[] args) {
        System.out.println(Frock.getNextNUM());
        System.out.println(Frock.getNextNUM());
        Frock frock = new Frock();
        Frock frock1 = new Frock();
        Frock frock2= new Frock();
        System.out.println(frock.getSeriaNumber());
        System.out.println(frock1.getSeriaNumber());
        System.out.println(frock2.getSeriaNumber());


    }
}